const router = require('koa-router')()
const fs = require('fs')

fs.readdirSync(__dirname).forEach(async (file) => {
  if (file != 'index.js') {
    let r = require('./' + file)
    await router.use(r.routes())
  }
})

module.exports = router